#ifndef __M_RETRO_H__
#define __M_RETRO_H__

#include <psp2/display.h>

#include "libretro.h"

void setCoreOptionsNum(int num);
int getCoreOptionsNum();

int isValidFile(char *path);

int initRetro();
int finishRetro();

int loadGame(const char *path);
int unloadGame();
int runGame();
int pauseGame();
int resumeGame();
int resetGame();
int reloadGame();
int exitGame();

int resetGameInRunning();
int exitGameInRunning();
int saveStateInRunning();
int loadStateInRunning();

void setRetroVariableUpdate(int update);
void updateCoreOptionsDisplayCallback();

extern struct retro_system_info core_system_info;
extern struct retro_system_av_info core_system_av_info;

extern enum SceGxmTextureFormat video_texture_format;

extern int game_loading, game_loaded, game_run;

#endif